"use strict";

const Controller = require("egg").Controller;
const fs = require("fs");
const path = require("path");

/**
 * @controller HelloController
 */
class HelloController extends Controller {
  /**
   * @summary Hello API
   * @router get /
   */
  async index() {
    // this.ctx.body = "hello world";
    // this.ctx.body = await this.service.hello.hello();
    const { ctx } = this;
    ctx.response.type = "html";
    ctx.body = fs.readFileSync(path.resolve(__dirname, "../public/index.html"));
  }
}

module.exports = HelloController;
